<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: image.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_12cda917fe1d7c8b4e7d2501bb3636e4.html">sdk</a></li><li class="navelem"><a class="el" href="dir_2f23e30b638d6a5f333babd9a5d183e1.html">include</a></li><li class="navelem"><a class="el" href="dir_d5ace589187da7c83c1a7507ec9fbbef.html">sifteo</a></li><li class="navelem"><a class="el" href="dir_9f7c4e3b7feb35fe458a50f9a0128960.html">asset</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">image.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* -*- mode: C; c-basic-offset: 4; intent-tabs-mode: nil -*-</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * This file is part of the public interface to the Sifteo SDK.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright &lt;c&gt; 2012 Sifteo, Inc. All rights reserved.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * This header needs to work in both userspace and non-userspace</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * builds, though the latter have a greatly reduced feature set.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#ifndef NOT_USERSPACE</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#   include &lt;sifteo/math.h&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#   include &lt;sifteo/macros.h&gt;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#   include &lt;sifteo/asset/group.h&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;sifteo/abi.h&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">namespace </span>Sifteo {</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html">   48</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a> {</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    _SYSAssetImage sys;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#ifndef NOT_USERSPACE   // Begin userspace-only members</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#afe1219ed666fe6542833d66e92411131">   54</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a> &amp;<a class="code" href="struct_sifteo_1_1_asset_image.html#afe1219ed666fe6542833d66e92411131" title="Access the AssetGroup instance associated with this AssetImage.">assetGroup</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><a class="code" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a>*<span class="keyword">&gt;</span>(sys.pAssetGroup); }</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#a5d009c22196e528ae23ac62c12484224">   57</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_asset_image.html#a5d009c22196e528ae23ac62c12484224" title="The (width, height) vector of this image, in tiles.">tileSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vec&lt;int&gt;(sys.width, sys.height); }</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#a0b80e9c84f6359affd495e8ee7247734">   60</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_asset_image.html#a0b80e9c84f6359affd495e8ee7247734" title="Half the size of this image, in tiles.">tileExtent</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#a5d009c22196e528ae23ac62c12484224" title="The (width, height) vector of this image, in tiles.">tileSize</a>() / 2; }</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#ae68536b7ec42db2c8a41b0af554a2e4a">   63</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_asset_image.html#ae68536b7ec42db2c8a41b0af554a2e4a" title="The (width, height) vector of this image, in pixels.">pixelSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vec&lt;int&gt;(sys.width &lt;&lt; 3, sys.height &lt;&lt; 3); }</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#a0ad82c0c661a638c7abf7bd08ec0f1be">   66</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_asset_image.html#a0ad82c0c661a638c7abf7bd08ec0f1be" title="Half the size of this image, in pixels.">pixelExtent</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#ae68536b7ec42db2c8a41b0af554a2e4a" title="The (width, height) vector of this image, in pixels.">pixelSize</a>() / 2; }</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">#endif   // End userspace-only members</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#adaba620b7063de2be6abba13e9857169">   71</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#adaba620b7063de2be6abba13e9857169" title="The width of this image, in tiles.">tileWidth</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.width; }</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#a7ff2fd5e83e49e79b376df2c8b156bbd">   74</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#a7ff2fd5e83e49e79b376df2c8b156bbd" title="The height of this image, in tiles.">tileHeight</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.height; }</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#a9424e069e3158b4fa07817b74abb27ba">   77</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#a9424e069e3158b4fa07817b74abb27ba" title="The width of this image, in pixels.">pixelWidth</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.width &lt;&lt; 3; }</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#a8b89f06945d7561ec348cb072740441b">   80</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#a8b89f06945d7561ec348cb072740441b" title="The height of this image, in pixels.">pixelHeight</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.height &lt;&lt; 3; }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#ae3fe0bc86eceaa8ae6b3e74aa21d2b7f">   83</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#ae3fe0bc86eceaa8ae6b3e74aa21d2b7f" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.frames; }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#a240e1324e3e9619de55ef4ab475a1c0b">   86</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#a240e1324e3e9619de55ef4ab475a1c0b" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#adaba620b7063de2be6abba13e9857169" title="The width of this image, in tiles.">tileWidth</a>() * <a class="code" href="struct_sifteo_1_1_asset_image.html#a7ff2fd5e83e49e79b376df2c8b156bbd" title="The height of this image, in tiles.">tileHeight</a>(); }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#a832137b84ebe8b60432f02e1030083a0">   89</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#a832137b84ebe8b60432f02e1030083a0" title="Compute the total number of tiles in the image.">numTiles</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_asset_image.html#ae3fe0bc86eceaa8ae6b3e74aa21d2b7f" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>() * <a class="code" href="struct_sifteo_1_1_asset_image.html#a240e1324e3e9619de55ef4ab475a1c0b" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>(); }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_image.html#a86ba78743f56c9f435424daf067340ad">   92</a></span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetImage&amp; () <span class="keyword">const</span> { <span class="keywordflow">return</span> sys; }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keyword">operator</span> _SYSAssetImage&amp; () { <span class="keywordflow">return</span> sys; }</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetImage* () <span class="keyword">const</span> { <span class="keywordflow">return</span> &amp;sys; }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keyword">operator</span> _SYSAssetImage* () { <span class="keywordflow">return</span> &amp;sys; }</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;};</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html">  115</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html" title="An AssetImage in which all tiles are stored sequentially in memory.">PinnedAssetImage</a> {</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    _SYSAssetImage sys;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor">#ifndef NOT_USERSPACE   // Begin userspace-only members</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a43d3af91bf282b314e63f0c903f9fc85">  121</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a> &amp;<a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a43d3af91bf282b314e63f0c903f9fc85" title="Access the AssetGroup instance associated with this AssetImage.">assetGroup</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><a class="code" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a>*<span class="keyword">&gt;</span>(sys.pAssetGroup); }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a4468b7093fc7c2d44479e4febebfa7e9">  124</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a4468b7093fc7c2d44479e4febebfa7e9" title="The (width, height) vector of this image, in tiles.">tileSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vec&lt;int&gt;(sys.width, sys.height); }</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a36f90fd692b2978fd79d0d49bc627f78">  127</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a36f90fd692b2978fd79d0d49bc627f78" title="Half the size of this image, in tiles.">tileExtent</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a4468b7093fc7c2d44479e4febebfa7e9" title="The (width, height) vector of this image, in tiles.">tileSize</a>() / 2; }</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#abc69a1ae22681012ba7db2c1b3fb84be">  130</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#abc69a1ae22681012ba7db2c1b3fb84be" title="The (width, height) vector of this image, in pixels.">pixelSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vec&lt;int&gt;(sys.width &lt;&lt; 3, sys.height &lt;&lt; 3); }</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a8d51b60def80ebedbb8d8d4208329931">  133</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a8d51b60def80ebedbb8d8d4208329931" title="Half the size of this image, in pixels.">pixelExtent</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#abc69a1ae22681012ba7db2c1b3fb84be" title="The (width, height) vector of this image, in pixels.">pixelSize</a>() / 2; }</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#acae95d334dc7ae91830e26cc8389bcb4">  141</a></span>&#160;    uint16_t <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#acae95d334dc7ae91830e26cc8389bcb4" title="Returns the index of the tile at linear position &#39;i&#39; in the image.">tile</a>(<span class="keywordtype">unsigned</span> i)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(i &lt; <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a1a79eb48f559340261e26ab15b334295" title="Compute the total number of tiles in the image.">numTiles</a>());</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <span class="keywordflow">return</span> sys.pData + i;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    }</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00152"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a16f5fffb2b33f59d1d528ab8377cd820">  152</a></span>&#160;    uint16_t <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a16f5fffb2b33f59d1d528ab8377cd820" title="Return the index of the tile at the specified (x, y) tile coordinates.">tile</a>(<a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> pos, <span class="keywordtype">unsigned</span> frame = 0)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a7362956454caca88012382934a1e94b9" title="Vector component X.">x</a> &lt; <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a804b121a9bafe5a3aa62d69f61cf9a99" title="The width of this image, in tiles.">tileWidth</a>() &amp;&amp; pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a6ef946409dc8f1fb0fb21f158ad12bec" title="Vector component Y.">y</a> &lt; <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a242af50f32025c080aad05c56bb81988" title="The height of this image, in tiles.">tileHeight</a>() &amp;&amp; frame &lt; <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a0fc89871179dd524e6a6152296b4c10b" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>());</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keywordflow">return</span> sys.pData + pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a7362956454caca88012382934a1e94b9" title="Vector component X.">x</a> + pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a6ef946409dc8f1fb0fb21f158ad12bec" title="Vector component Y.">y</a> * <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a242af50f32025c080aad05c56bb81988" title="The height of this image, in tiles.">tileHeight</a>() + frame * <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a8893c31efc01a214cb6c026c9bd380ba" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>();</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    }</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a9a952db939b42c36a5bf89dc52edaa18">  163</a></span>&#160;    uint16_t <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a9a952db939b42c36a5bf89dc52edaa18" title="Returns the index of the tile at linear position &#39;i&#39; in the image.">tile</a>(_SYSCubeID cube, <span class="keywordtype">unsigned</span> i)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(i &lt; <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a1a79eb48f559340261e26ab15b334295" title="Compute the total number of tiles in the image.">numTiles</a>());</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a43d3af91bf282b314e63f0c903f9fc85" title="Access the AssetGroup instance associated with this AssetImage.">assetGroup</a>().<a class="code" href="struct_sifteo_1_1_asset_group.html#aec1526f48df5c2662ffb722595382908" title="Return the base address of this asset group, as loaded onto the specified cube.">baseAddress</a>(cube) + sys.pData + i;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    }</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#af52024d4e6dfe0aae0f5c52e26dfc5a0">  174</a></span>&#160;    uint16_t <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#af52024d4e6dfe0aae0f5c52e26dfc5a0" title="Return the index of the tile at the specified (x, y) tile coordinates.">tile</a>(_SYSCubeID cube, <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> pos, <span class="keywordtype">unsigned</span> frame = 0)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a7362956454caca88012382934a1e94b9" title="Vector component X.">x</a> &lt; <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a804b121a9bafe5a3aa62d69f61cf9a99" title="The width of this image, in tiles.">tileWidth</a>() &amp;&amp; pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a6ef946409dc8f1fb0fb21f158ad12bec" title="Vector component Y.">y</a> &lt; <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a242af50f32025c080aad05c56bb81988" title="The height of this image, in tiles.">tileHeight</a>() &amp;&amp; frame &lt; <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a0fc89871179dd524e6a6152296b4c10b" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>());</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a43d3af91bf282b314e63f0c903f9fc85" title="Access the AssetGroup instance associated with this AssetImage.">assetGroup</a>().<a class="code" href="struct_sifteo_1_1_asset_group.html#aec1526f48df5c2662ffb722595382908" title="Return the base address of this asset group, as loaded onto the specified cube.">baseAddress</a>(cube) + sys.pData</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;            + pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a7362956454caca88012382934a1e94b9" title="Vector component X.">x</a> + pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a6ef946409dc8f1fb0fb21f158ad12bec" title="Vector component Y.">y</a> * <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a242af50f32025c080aad05c56bb81988" title="The height of this image, in tiles.">tileHeight</a>() + frame * <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a8893c31efc01a214cb6c026c9bd380ba" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>();</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    }</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="preprocessor">#endif   // End userspace-only members</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a804b121a9bafe5a3aa62d69f61cf9a99">  183</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a804b121a9bafe5a3aa62d69f61cf9a99" title="The width of this image, in tiles.">tileWidth</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.width; }</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a242af50f32025c080aad05c56bb81988">  186</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a242af50f32025c080aad05c56bb81988" title="The height of this image, in tiles.">tileHeight</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.height; }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a17840b459c17d312635b11eb68de087f">  189</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a17840b459c17d312635b11eb68de087f" title="The width of this image, in pixels.">pixelWidth</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.width &lt;&lt; 3; }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a8d536cdb6ead6015ae6022fe5735014e">  192</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a8d536cdb6ead6015ae6022fe5735014e" title="The height of this image, in pixels.">pixelHeight</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.height &lt;&lt; 3; }</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a0fc89871179dd524e6a6152296b4c10b">  195</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a0fc89871179dd524e6a6152296b4c10b" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.frames; }</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div>
<div class="line"><a name="l00198"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a8893c31efc01a214cb6c026c9bd380ba">  198</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a8893c31efc01a214cb6c026c9bd380ba" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a804b121a9bafe5a3aa62d69f61cf9a99" title="The width of this image, in tiles.">tileWidth</a>() * <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a242af50f32025c080aad05c56bb81988" title="The height of this image, in tiles.">tileHeight</a>(); }</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;</div>
<div class="line"><a name="l00201"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a1a79eb48f559340261e26ab15b334295">  201</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a1a79eb48f559340261e26ab15b334295" title="Compute the total number of tiles in the image.">numTiles</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a0fc89871179dd524e6a6152296b4c10b" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>() * <a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a8893c31efc01a214cb6c026c9bd380ba" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>(); }</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a3e6f35ec703bc42800da76cf41a50637">  204</a></span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> <a class="code" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>&amp; () <span class="keyword">const</span> { <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><a class="code" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); }</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="keyword">operator</span> <a class="code" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>&amp; () { <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><a class="code" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); }</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> AssetImage* () <span class="keyword">const</span> { <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span>AssetImage*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); }</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keyword">operator</span> AssetImage* () { <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span>AssetImage*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div>
<div class="line"><a name="l00210"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_pinned_asset_image.html#a59d17e1672846f14b462e95e481b0d20">  210</a></span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetImage&amp; () <span class="keyword">const</span> { <span class="keywordflow">return</span> sys; }</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <span class="keyword">operator</span> _SYSAssetImage&amp; () { <span class="keywordflow">return</span> sys; }</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetImage* () <span class="keyword">const</span> { <span class="keywordflow">return</span> &amp;sys; }</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <span class="keyword">operator</span> _SYSAssetImage* () { <span class="keywordflow">return</span> &amp;sys; }</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;};</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div>
<div class="line"><a name="l00228"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html">  228</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_sifteo_1_1_flat_asset_image.html" title="An AssetImage in which all tile indices are stored in a flat array, without any additional compressio...">FlatAssetImage</a> {</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    _SYSAssetImage sys;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<span class="preprocessor">#ifndef NOT_USERSPACE   // Begin userspace-only members</span></div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00234"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a5278716da282fc1a30da8410fa23d0d9">  234</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a> &amp;<a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a5278716da282fc1a30da8410fa23d0d9" title="Access the AssetGroup instance associated with this AssetImage.">assetGroup</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><a class="code" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a>*<span class="keyword">&gt;</span>(sys.pAssetGroup); }</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div>
<div class="line"><a name="l00237"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a63c088c3b7c672609f15a459b3e1caf6">  237</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a63c088c3b7c672609f15a459b3e1caf6" title="The (width, height) vector of this image, in tiles.">tileSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vec&lt;int&gt;(sys.width, sys.height); }</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div>
<div class="line"><a name="l00240"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a67cd09e542cf38d32fc85afa5f5a6c34">  240</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a67cd09e542cf38d32fc85afa5f5a6c34" title="Half the size of this image, in tiles.">tileExtent</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a63c088c3b7c672609f15a459b3e1caf6" title="The (width, height) vector of this image, in tiles.">tileSize</a>() / 2; }</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div>
<div class="line"><a name="l00243"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a341e551fe8a2140cd0db2f4b79ef7a2f">  243</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a341e551fe8a2140cd0db2f4b79ef7a2f" title="The (width, height) vector of this image, in pixels.">pixelSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vec&lt;int&gt;(sys.width &lt;&lt; 3, sys.height &lt;&lt; 3); }</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;</div>
<div class="line"><a name="l00246"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#aa39f8a8a7be2d878cd39b9565288f11c">  246</a></span>&#160;    <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#aa39f8a8a7be2d878cd39b9565288f11c" title="Half the size of this image, in pixels.">pixelExtent</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a341e551fe8a2140cd0db2f4b79ef7a2f" title="The (width, height) vector of this image, in pixels.">pixelSize</a>() / 2; }</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div>
<div class="line"><a name="l00254"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#afad8d2db3814ce61dfbbe489bf20e159">  254</a></span>&#160;    <span class="keyword">const</span> uint16_t *<a class="code" href="struct_sifteo_1_1_flat_asset_image.html#afad8d2db3814ce61dfbbe489bf20e159" title="Get a pointer to the raw tile data.">tileArray</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span>uint16_t *<span class="keyword">&gt;</span>(sys.pData);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    }</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div>
<div class="line"><a name="l00264"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a33aef6679692bac26d48b33c6f074cf1">  264</a></span>&#160;    uint16_t <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a33aef6679692bac26d48b33c6f074cf1" title="Returns the index of the tile at linear position &#39;i&#39; in the image.">tile</a>(<span class="keywordtype">unsigned</span> i)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(i &lt; <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ae4b22dc0402e7be2d1f6663b0158a167" title="Compute the total number of tiles in the image.">numTiles</a>());</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#afad8d2db3814ce61dfbbe489bf20e159" title="Get a pointer to the raw tile data.">tileArray</a>()[i];</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    }</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div>
<div class="line"><a name="l00275"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a47befa7200ae95638eea36d1f4bc9703">  275</a></span>&#160;    uint16_t <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a47befa7200ae95638eea36d1f4bc9703" title="Return the index of the tile at the specified (x, y) tile coordinates.">tile</a>(<a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> pos, <span class="keywordtype">unsigned</span> frame = 0)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a7362956454caca88012382934a1e94b9" title="Vector component X.">x</a> &lt; <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ade13db450f24c30018788509054088f6" title="The width of this image, in tiles.">tileWidth</a>() &amp;&amp; pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a6ef946409dc8f1fb0fb21f158ad12bec" title="Vector component Y.">y</a> &lt; <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a54d741a281628d8005f32f1516c739e9" title="The height of this image, in tiles.">tileHeight</a>() &amp;&amp; frame &lt; <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a86994997a0de1b2a20baf394f1e230ad" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>());</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#afad8d2db3814ce61dfbbe489bf20e159" title="Get a pointer to the raw tile data.">tileArray</a>()[pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a7362956454caca88012382934a1e94b9" title="Vector component X.">x</a> + pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a6ef946409dc8f1fb0fb21f158ad12bec" title="Vector component Y.">y</a> * <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a54d741a281628d8005f32f1516c739e9" title="The height of this image, in tiles.">tileHeight</a>() + frame * <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a73acad9c9df996c8161d02e0bf022c9c" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>()];</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    }</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;</div>
<div class="line"><a name="l00286"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a246111612780e68fbf9463a64c945f48">  286</a></span>&#160;    uint16_t <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a246111612780e68fbf9463a64c945f48" title="Returns the index of the tile at linear position &#39;i&#39; in the image.">tile</a>(_SYSCubeID cube, <span class="keywordtype">unsigned</span> i)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(i &lt; <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ae4b22dc0402e7be2d1f6663b0158a167" title="Compute the total number of tiles in the image.">numTiles</a>());</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a5278716da282fc1a30da8410fa23d0d9" title="Access the AssetGroup instance associated with this AssetImage.">assetGroup</a>().<a class="code" href="struct_sifteo_1_1_asset_group.html#aec1526f48df5c2662ffb722595382908" title="Return the base address of this asset group, as loaded onto the specified cube.">baseAddress</a>(cube) + <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#afad8d2db3814ce61dfbbe489bf20e159" title="Get a pointer to the raw tile data.">tileArray</a>()[i];</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    }</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div>
<div class="line"><a name="l00297"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a0230c2d8433eca29f5d489db08ad05fd">  297</a></span>&#160;    uint16_t <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a0230c2d8433eca29f5d489db08ad05fd" title="Return the index of the tile at the specified (x, y) tile coordinates.">tile</a>(_SYSCubeID cube, <a class="code" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Int2</a> pos, <span class="keywordtype">unsigned</span> frame = 0)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a7362956454caca88012382934a1e94b9" title="Vector component X.">x</a> &lt; <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ade13db450f24c30018788509054088f6" title="The width of this image, in tiles.">tileWidth</a>() &amp;&amp; pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a6ef946409dc8f1fb0fb21f158ad12bec" title="Vector component Y.">y</a> &lt; <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a54d741a281628d8005f32f1516c739e9" title="The height of this image, in tiles.">tileHeight</a>() &amp;&amp; frame &lt; <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a86994997a0de1b2a20baf394f1e230ad" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>());</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a5278716da282fc1a30da8410fa23d0d9" title="Access the AssetGroup instance associated with this AssetImage.">assetGroup</a>().<a class="code" href="struct_sifteo_1_1_asset_group.html#aec1526f48df5c2662ffb722595382908" title="Return the base address of this asset group, as loaded onto the specified cube.">baseAddress</a>(cube) + <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#afad8d2db3814ce61dfbbe489bf20e159" title="Get a pointer to the raw tile data.">tileArray</a>()[</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;            pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a7362956454caca88012382934a1e94b9" title="Vector component X.">x</a> + pos.<a class="code" href="struct_sifteo_1_1_vector2.html#a6ef946409dc8f1fb0fb21f158ad12bec" title="Vector component Y.">y</a> * <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a54d741a281628d8005f32f1516c739e9" title="The height of this image, in tiles.">tileHeight</a>() + frame * <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a73acad9c9df996c8161d02e0bf022c9c" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>()];</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    }</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="preprocessor">#endif   // End userspace-only members</span></div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00306"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ade13db450f24c30018788509054088f6">  306</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ade13db450f24c30018788509054088f6" title="The width of this image, in tiles.">tileWidth</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.width; }</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;</div>
<div class="line"><a name="l00309"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a54d741a281628d8005f32f1516c739e9">  309</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a54d741a281628d8005f32f1516c739e9" title="The height of this image, in tiles.">tileHeight</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.height; }</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;</div>
<div class="line"><a name="l00312"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ae19a294842a86b36a54e32e694f7e1cf">  312</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ae19a294842a86b36a54e32e694f7e1cf" title="The width of this image, in pixels.">pixelWidth</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.width &lt;&lt; 3; }</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;</div>
<div class="line"><a name="l00315"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#aefa0f1b4148e84a9d3ce75ad446d393c">  315</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#aefa0f1b4148e84a9d3ce75ad446d393c" title="The height of this image, in pixels.">pixelHeight</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.height &lt;&lt; 3; }</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;</div>
<div class="line"><a name="l00318"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a86994997a0de1b2a20baf394f1e230ad">  318</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a86994997a0de1b2a20baf394f1e230ad" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sys.frames; }</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;</div>
<div class="line"><a name="l00321"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a73acad9c9df996c8161d02e0bf022c9c">  321</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a73acad9c9df996c8161d02e0bf022c9c" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ade13db450f24c30018788509054088f6" title="The width of this image, in tiles.">tileWidth</a>() * <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a54d741a281628d8005f32f1516c739e9" title="The height of this image, in tiles.">tileHeight</a>(); }</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;</div>
<div class="line"><a name="l00324"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ae4b22dc0402e7be2d1f6663b0158a167">  324</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#ae4b22dc0402e7be2d1f6663b0158a167" title="Compute the total number of tiles in the image.">numTiles</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a86994997a0de1b2a20baf394f1e230ad" title="Access the number of &#39;frames&#39; in this image.">numFrames</a>() * <a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a73acad9c9df996c8161d02e0bf022c9c" title="Compute the total number of tiles per frame (tileWidth * tileHeight)">numTilesPerFrame</a>(); }</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;</div>
<div class="line"><a name="l00327"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a16d35df7e711267cde66d0f3e4a7e750">  327</a></span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> <a class="code" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>&amp; () <span class="keyword">const</span> { <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><a class="code" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); }</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    <span class="keyword">operator</span> <a class="code" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>&amp; () { <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><a class="code" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); }</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> AssetImage* () <span class="keyword">const</span> { <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span>AssetImage*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); }</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    <span class="keyword">operator</span> AssetImage* () { <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span>AssetImage*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); }</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div>
<div class="line"><a name="l00333"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_flat_asset_image.html#a544f2c8f6cb753ef48079945cdcaff5a">  333</a></span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetImage&amp; () <span class="keyword">const</span> { <span class="keywordflow">return</span> sys; }</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;    <span class="keyword">operator</span> _SYSAssetImage&amp; () { <span class="keywordflow">return</span> sys; }</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetImage* () <span class="keyword">const</span> { <span class="keywordflow">return</span> &amp;sys; }</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    <span class="keyword">operator</span> _SYSAssetImage* () { <span class="keywordflow">return</span> &amp;sys; }</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;};</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;};  <span class="comment">// namespace Sifteo</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
